---
layout: default
css: [common.css,header.css,footer.css,totop.css,articlelist.css]
js: [common.js,header.js,totop.js]
---
<div id="articlelist">
	{% for post in site.posts  %}
		{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
		{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}

		{% if forloop.first %}
			<div class="type-head">{{ this_year }}</div>
			<ul>
		{% endif %}

		{% if this_year == next_year %}
			<li>
				<time>{{ post.date | date: "%Y/%m/%d" }}&nbsp;</time>
				<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
				<span>&nbsp;
					{% for cat in post.categories %}
						<a href="{{ site.categoriesurl }}/#{{ cat }}">{{ cat }}</a>
					{% endfor %}
				</span>
			</li>
		{% else %}
			{% if forloop.last %}
					<li>
						<time>{{ post.date | date: "%Y/%m/%d" }}&nbsp;</time>
						<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
						<span>&nbsp;
							{% for cat in post.categories %}
								<a href="{{ site.categoriesurl }}/#{{ cat }}">{{ cat }}</a>
							{% endfor %}
						</span>
					</li>
				</ul>
			{% else %}
					<li>
						<time>{{ post.date | date: "%Y/%m/%d" }}&nbsp;</time>
						<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
						<span>&nbsp;
							{% for cat in post.categories %}
								<a href="{{ site.categoriesurl }}/#{{ cat }}">{{ cat }}</a>
							{% endfor %}
						</span>
					</li>
				</ul>
				<div class="type-head">{{ next_year }}</div>
				<ul>
			{% endif %}
		{% endif %}
	{% endfor %}
</div>
